<template>
  <div class="progress">
    <div class="title nowrap">{{ Info.name }}</div>
    <div class="content">
      <div class="content-scale" :style="{ width: Info.scale }">
        <div :class="{animation: Info.start}" :style="{ background: Info.color }"></div>
      </div>
    </div>
    <div class="value nowrap">{{ Info.num | numberToK }}</div>
  </div>
</template>
<script>
export default {
  props: {
    Info: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {

    }
  }
}
</script>
<style lang="less" scoped>

@keyframes load{
  0%{
      width: 0%;
  }
  100%{
      width:100%;
  }
}

.nowrap {
  overflow: hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
}

.progress {
  display: flex;
  padding: 5px 0;
  .title {
    flex-basis: 65px;
    font-size: 12px;
    padding-right: 5px;
    align-self: center;
  }
  .content {
    margin: 5px 0;
    flex: 1;
    border-radius: 2px;
    background: #F2F3F5;
    .content-scale {
      height: 100%;
      .animation {
        height: 100%;
        border-radius: 2px;
        animation:load .5s ease-in;
      }
    }
    
  }
  .value {
    flex-basis: 35px;
    padding-left: 5px;
    text-align: right;
    transform: scale(0.8);
  }
}
</style>
